//
//  DetailsTableViewCell.m
//  UI_HLJ_Frame
//
//  Created by dllo on 15/7/8.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "DetailsTableViewCell.h"

@implementation DetailsTableViewCell

- (void)dealloc
{
    [_details retain];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.details = [[UILabel alloc] init];
        [self.contentView addSubview:self.details];
    }
    return self;
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
//    self.details.frame = CGRectMake(10, 10, 355, 500);
//    self.details.backgroundColor = [UIColor colorWithRed:1.000 green:0.648 blue:0.202 alpha:1.000];
    self.details.numberOfLines = 0;
    self.details.lineBreakMode = 1;
    
    // 根据文本计算高度,限制一个文本的最大范围(375,0)
    // 第二个属性作用:指定一个属性来定义对应文本和字体所占用的高度
    self.details.frame = CGRectMake(10,0, self.contentView.frame.size.width-20, self.contentView.frame.size.height );
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
